deserialize
deserializes the fields stored value from TomlElement. This should not set the fields stored value, or interact with the field at all except to get the stored value for error reporting. deserializeEntry handles that.
Any of the built-in validations can be used for inspiration and help in parsing Toml Elements or using ValidationResult.
Return
ValidationResult<T> - result of the deserialization. If there is a problem, report a ValidationResult.error
, using the fields current stored value, and the fieldName as relevant to the error message.
Author
fzzyhmstrs
Since
0.5.0
Parameters
toml
TomlElement element to deserialize from.
field Name
String representation of the field name in the config, for error reporting